//
//  HBBoundListDesCell.m
//  HuoBao
//
//  Created by chaiyanan on 15/12/3.
//  Copyright © 2015年 jinxin. All rights reserved.
//

#import "HBBoundListDesCell.h"

@implementation HBBoundListDesCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
         self.backgroundColor = [LCCommon getColor:@"e1e1e1"];
        
        [self createCustomView];
    }
    return self;
}

- (void)createCustomView
{
    
    [self createLableWithTextColor:[LCCommon getColor:@"888888"] font:[UIFont boldSystemFontOfSize:11.0f] text:@"您当前投资的债权" textAlignment:NSTextAlignmentCenter frame:CGRectMake(0, 0, SCREEN_WIDTH, 45) superView:self];

    
    [self createSepratorLineWithFrame:CGRectMake(15, 44-1/([UIScreen mainScreen].scale), SCREEN_WIDTH-30, 1/([UIScreen mainScreen].scale)) backgroundColor:[LCCommon getColor:@"cccccc"] superView:self.contentView];
    
}

- (UILabel *)createLableWithTextColor:(UIColor *)color font:(UIFont *)font text:(NSString *)text textAlignment:(NSTextAlignment)textAlignment frame:(CGRect)frame superView:(UIView *)superView
{
    UILabel *lable = [[UILabel alloc]initWithFrame:frame];
    lable.textColor = color;
    lable.font = font;
    lable.text = text;
    lable.textAlignment = textAlignment;
    [superView addSubview:lable];
    return lable;
}

- (UIView *)createSepratorLineWithFrame:(CGRect)frame backgroundColor:(UIColor *)bgColor superView:(UIView *)superView
{
    UIView *sepratorLine = [[UIView alloc]initWithFrame:frame];
    sepratorLine.backgroundColor = bgColor;
    [superView addSubview:sepratorLine];
    return sepratorLine;
}


@end
